//
//  DateSelectView.m
//  diaoyuren
//
//  Created by 钓鱼人 on 16/2/27.
//  Copyright © 2016年 game. All rights reserved.
//

#import "DateSelectView.h"

@implementation DateSelectView


-(void)awakeFromNib{

    radius(self.shiyi, 3);

}


-(void)setModel:(WeathForecastModel *)model{
    _model = model;
    
    
    self.weath.text = _model.weather;
    
    self.temperature.text = _model.temperature;
    
    self.date.text = _model.weekday;
    
    self.shiyi.text = [NSString stringWithFormat:@"%@ ",_model.score_name];
    

    self.image.image = [UIImage imageNamed:[NSString stringWithFormat:@"%@_big",_model.weather_icon]];

    if ([_model.score_name isEqualToString:@"适宜"]) {
        
        self.shiyi.backgroundColor = RGBA(0, 191, 255, 1);
        
    }
    
    if ([_model.score_name isEqualToString:@"很适宜"]) {
        
        self.shiyi.backgroundColor = mainColor;
        
    }
    
    if ([_model.score_name isEqualToString:@"不适宜"]) {
        
        self.shiyi.backgroundColor = RGBAS;
        
    }
    
    if ([_model.score_name isEqualToString:@"极不适宜"]) {
        
        self.shiyi.backgroundColor = RGBA(255, 0, 0, 1);
    }
//
//    if ([_model.score_name isEqualToString:@"非常适宜"]) {
//        
//        self.shiyi.backgroundColor = mainColor;
//        
//    }
    
    
    

}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
